import java.util.Scanner;

public class Main3 {

    public static void main(String[] args){
        Scanner scanner = new Scanner(System.in);
        Long num = scanner.nextLong();
        System.out.print(getResult(num));
    }

    public static String getResult(long num){
        StringBuffer sb = new StringBuffer();
        Long len = num/2;
        for(int i=2;i<=len;){
            if(num%i==0){
                num = num%i;
                sb.append(i+" ");
            }else{
                i++;
            }
        }
        return sb.toString();
    }
}
